import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {AuthAccessGuard} from '../../guard/auth-access.guard';
import {SettingComponent} from './setting/setting.component';
import {ProfileComponent} from './profile.component';

const routes: Routes = [
  {
    path: '', component: ProfileComponent, canActivate: [AuthAccessGuard], children: [
      {path: '', pathMatch: 'full', redirectTo: 'setting'},
      {path: 'setting', component: SettingComponent},
    ]
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class ProfileRoutingModule {
}
